package cn.tedu.sp09.feign;


import cn.tedu.pojo.Item;
import cn.tedu.pojo.Order;
import cn.tedu.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

//根据服务id，从注册表得到主机地址
@FeignClient(name = "order-service",fallback =OrderClientFB.class )
public interface OrderClient {

    @GetMapping("/{orderId}")
    JsonResult<Order> getOrder(@PathVariable String orderId);


    @GetMapping("/")
    JsonResult<?> addOrder();
}
